#define _CRT_SECURE_NO_WARNINGS

#include <stdio.h>
int judge(int n)
{
	if (n == 1)
	{
		return 0;
	}
	for (int i = 2; i * i <= n; i++)
	{
		if (n % i == 0)
		{
			return 0;
		}
	}
	return n;
}
int main()
{
	int l;
	scanf("%d", &l);
	int sum = 0;
	int num = 0;
		for (int i = 2; i <= l; i++) 
		{

			if (judge(i))
			{
				sum += judge(i);
				num++;
				printf("%d\n", judge(i));
			}
			if (sum + judge(i) >= l)
				break;
		}
		
	printf("%d\n", num);

	return 0;
}